import type { FC } from 'react';
import { View } from 'react-native';
import { useMemoizedFn } from 'ahooks';
import { Space, Button, Modal } from '@/components';
import Likes from '@/components/PostItem/likes';
import Favorite from '@/components/PostItem/favorite';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import styles from './styles';

const wait = () => new Promise(r => {
  setTimeout(r, 3000);
});

const ActionBar: FC = () => {
  const { bottom } = useSafeAreaInsets();

  const onPress = useMemoizedFn(() => {
    
  });

  const wrapperStyles = [
    styles.wrapper,
    { paddingBottom: bottom }
  ];

  return (
    <View style={wrapperStyles}>
      <View style={[styles.content, styles.shadow]}>
        <View style={styles.between}>
          <Space
            size={24}
            style={styles.actions}
          >
            <Favorite total={10} large />
            <Likes total={10} liked={false} large />
          </Space>
          <Button
            size="mini"
            type="primary"
            onPress={onPress}
            title="Participate"
          />
        </View>
      </View>
    </View>
  );
}

export default ActionBar;